import React,{Component}from 'react'
import {Switch,Route,Redirect} from 'react-router-dom'
import PrivateRoute from '../components/PrivateRoute'
import Login from '../pages/Login/index.js'
import Home from '../pages/Home'
import JumpTest from '../pages/JumpTest/index.js'


class RouterIndex extends Component{
  render(){
    return(
      <Switch>
        <Route path='/' exact render={()=>
          <Redirect to="/login"/>
        }>
        </Route>
        {/* <PrivateRoute path='/' component={JumpTest}/> */}
        <Route path='/login' component={Login}/>
        {/* <Route path='/home' component={Home}/> */}
        <Route path='/home/:name' component={Home}/>
        <Route path='/jumptest' component={JumpTest}/>
      </Switch>
    )
  }
}

export default RouterIndex;
